package com.solution.admin.customer.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.solution.admin.customer.dao.CustomerTagDao;
import com.solution.admin.customer.entity.CustomerTagEntity;
import com.solution.common.dao.impl.BaseDaoImpl;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 客户标签配置DAO实现
 * @author solin
 * @date 2017-09-16 23:49:38
 */
@Repository
public class CustomerTagDaoImpl extends BaseDaoImpl<CustomerTagEntity> implements CustomerTagDao {

	/**
	 * 保存客户标签配置信息
	 * @param ebCustomerTagEntity
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:49:38
	 */
	@Override
	public long saveEbCustomerTag(CustomerTagEntity ebCustomerTagEntity) {
		return super.insert(ebCustomerTagEntity);
	}

	/**
	 * 分页查询客户标签配置信息
	 * @param pageParam 分页对象
	 * @param ebCustomerTag 分页参数
	 * @return PageBean 分页参数及数据
	 * @author solin
	 * @date 2017-09-16 23:49:38
	 */
	public PageBean listEbCustomerTagPage(PageParam pageParam, Map<String, Object> param) {
		return super.listPage(pageParam, param);
	}

	/**
	 * 更新客户标签配置
	 * @param ebCustomerTagEntity
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:49:38
	 */
	@Override
	public int updateEbCustomerTag(CustomerTagEntity ebCustomerTagEntity) {
		return super.update(ebCustomerTagEntity);
	}

	/**
	 * 删除客户标签配置
	 * @param ebCustomerTagId
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:49:38
	 */
	public int deleteEbCustomerTagById( Long id) {
		return super.deleteById(id);
	}
	
	/**
	 * 根据条件查询客户标签配置
	 * @param param
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:49:38
	 */
	@Override
	public List<CustomerTagEntity> listEbCustomerTag( Map<String, Object> param) {
		return super.listBy(param);
	}
}
